package com.aysafety.core.common;

import java.util.HashMap;
import java.util.Map;

import com.aysafety.core.socketdto.*;

public class DtoToMapUtils {

    public static Map<String, Object> DTOToMap(NaturalGasDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(MicroseismDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(ErrorDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(HydraulicSupportDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(GeosoundDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(AcousticEmissionIntensityDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(CurrentBreakerDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(ElectromagneticIntensityDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(ElectromagneticPulseDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(GasDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(SonicPulseDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }

    public static Map<String, Object> DTOToMap(WindsDTO dto) {
        Map<String, Object> sendData = new HashMap<String, Object>();
        sendData.put("clientId", dto.getClientId());
        sendData.put("type", dto.getType());
        sendData.put("data", dto.getData());
        sendData.put("createDate", dto.getCreateDate());
        sendData.put("dataType", dto.getDataType());
        return sendData;
    }
}
